package com.jiayinlending.retrofit.api;

import com.jiayinlending.model.Sms;

import retrofit2.Call;
import retrofit2.Response;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.Path;
import rx.Observable;

/**
 * Created by yuexiaohui on 2017/5/5 17:31
 */

public interface HomeApi {

    @POST("/register")
    Observable<Response> toggleProjectStar(@Field("cellphone") String cellphone, @Field("password") String password);

    //获取验证码
    @FormUrlEncoded
    @POST("/sms")
    Observable<Sms> getSms(@Field("cellphone") String cellphone, @Field("type") String type, @Field("timestamp") String timestamp, @Field("sign") String sign);

    //验证验证码
    @FormUrlEncoded
    @POST("/sms/verification")
    Observable<Sms> getSmsVerification(@Field("cellphone") String cellphone, @Field("smsCaptcha") String smsCaptcha, @Field("type") String type);

}
